<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <%@include file="style.jsp" %>
    <%@include file="script.jsp" %>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/orderlang/distributor/css/pay_record.css"/>
    <title>我的订货郎</title>
</head>
<body onselectstart="return false">
<div id="container_1" style="height:100%">
    <div style="position: relative">
        <%@include file="header.jsp" %>
    </div>
    <div id="content" class="clearfix">
        <%@include file="left_menu.jsp" %>
        <!--内容部分-->
        <div class="right-content" style="margin:75px 50px 0 213px;">
            <p class="brand">
                <a>订单</a>><a href="${pageContext.request.contextPath}/order/findOrderList">订单查询</a>><a class="now">订单详情</a>
            </p>
            <div class="tabs clearfix">
               <div class="fl"><a href="${pageContext.request.contextPath}/order/findOrderInfoDetailById?id=${order.id}">订单详情</a></div>
                <div class="fl"><a href="${pageContext.request.contextPath}/setOut/findStaySetOutProductDetail?id=${order.id}&state=${order.orderState}">出库/发货记录</a></div>
                <div class="active fl"><a href="${pageContext.request.contextPath}/pay/findIncomeRecordListTest?id=${order.id}">付款记录</a></div>
            </div>
            <div class="content">
                <div class="record-block">
                    <form action="${pageContext.request.contextPath}/pay/insertIncomeRecord" method="post">
                        <h4>添加收款记录</h4>
                        <h5><span class="company">西安通昱消防电子科技有限公司</span><span>订单号：</span><input id="order_info_id" type="hidden" name="orderInfoId" value="${order.id}" /><span>DH1594616161${order.orderCode}</span></h5>
                        <h5 class="clearfix">
                            <div class="big-font">尚未支付：<span class="money">￥136.00</span></div>
                            <div>订单金额：<span class="money">￥136.00${order.amount}</span></div>
                            <div>已支付：<span class="money">￥0.00</span></div>
                            <div>待确认：<span class="money">￥0.00</span></div>
                        </h5>
                        <div class="pay-way clearfix">
                            <span class="fl">付款方式：</span>
                            <p class="fl">后付-已经线下转账</p>
                            <p class="fl">后付-挂账</p>
                            <p class="active fl">后付-已经现金支付</p>
                        </div>
                        <div class="clearfix">
                            <div class="date fl">
                                <span>付款日期</span>
                                <input id="datePicker" type="text" name="incomeTime" onchange="changes()"/>
                            </div>
                            <div class="payment-amount fl">
                                <span>付款金额</span>
                                <input type="text" name="amount"/>
                            </div>
                        </div>
                        <div class="remark">
                            <span>付款备注</span>
                            <textarea name="remark" id="" cols="30" rows="10"></textarea>
                        </div>
                        <div class="account-number clearfix select-box">
                            <span class="fl">收款账号</span>
                            <div class="fl">
                                <input type="text"  readonly/>
                                <ul class="hide">
                                    <li>招商银行西安支行****1616</li>
                                    <li>建设银行西安支行****5841</li>
                                    <li>农业银行西安支行****1985</li>
                                    <li>陕西信合西安支行****1254</li>
                                </ul>
                            </div>
                        </div>
                        <div class="file-upload clearfix">
                            <span class="fl">付款凭证上传</span>
                            <div class="upload-block fl" onclick="$('#file-upload').click()">
                                <span>点击上传</span>
                            </div>
                            <input id="file-upload" type="file" style="display: none"/>
                            <span class="prompt">（附件大小：小于4M；支持格式：JPG、PNG、BPN 、WORD 、EXCEL 、TEXT）</span>
                        </div>
                        <div class="btn-block">
                            <input type="submit" class="queren" value="确认"/>
                            <input type="button" class="quxiao" value="取消"/>
                        </div>
                    </form>
                </div>
                <div>
                    <span class="state">【<span>${order.orderState}</span>一<span class="small-font">${order.paymentState}</span>】</span>
                    <span class="gray-font">订单号：</span>
                    <span>DH${order.orderCode}</span>
                </div>
                <div class="clearfix">
                    <div class="sum fl">
                        <span class="gray-font">订单金额：</span>
                        <span class="money">￥${order.amount}</span>
                    </div>
                    <div class="paid fl">
                        <span class="gray-font">已支付：</span>
                        <span class="money">￥${order.receivedAmount}</span>
                    </div>
                    <div class="wait-confirm fl">
                        <span class="gray-font">待确认：</span>
                        <span class="money">￥${order.tbcAmount}</span>
                    </div>
                    <div class="unpaid fl">
                        <span class="gray-font">尚未支付：</span>
                        <span class="money">￥${order.specialApprovalAmount}</span>
                    </div>
                    <div class="add-record fr">添加收款记录</div>
                </div>
                <table>
                    <thead>
                        <tr>
                            <td width="14%">支付流水号</td>
                            <td width="12%">时间</td>
                            <td width="13%">付款金额</td>
                            <td width="13%">支付方式</td>
                            <td width="13%">资金账户</td>
                            <td width="13%">状态</td>
                            <td>操作</td>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>ZF20170514001</td>
                            <td>2017-6-30</td>
                            <td>￥100.00</td>
                            <td>线下转账</td>
                            <td>6210258487458541</td>
                            <td>待确认</td>
                            <td>
                                <button class="detail">查看</button>
                                <button class="confirm-money">确认收款</button>
                            </td>
                        </tr>
						<c:forEach begin="0" step="1" items="${incomeRecords}" var="iR" varStatus="userlist">
						<tr>
                            <td>${iR.id}</td>
                            <td><fmt:formatDate value="${iR.incomeTime}" pattern="yyyy-MM-dd"/></td>
                            <td>￥${iR.amount}</td>
                            <td>${iR.mode}</td>
                            <td>${iR.remark}</td>
                            <td>${iR.isConfirm}</td>
                            <td>
                                <button class="detail">查看</button>
                                <button class="confirm-money">确认收款</button>
                            </td>
                        </tr>
						</c:forEach>
                    </tbody>
                </table> 
                <!-- -----分页----- -->
                <div class="quotes" style="margin-top: 50px"></div>
                <div class="no-product hide">暂无更多数据</div>
            </div>
        </div>
        <script src="${pageContext.request.contextPath}/static/orderlang/distributor/js/pay_record.js"></script>
        <!--内容部分结束-->
    </div>
</div>

</body>
</html>